home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / escalant / escala21.lha / escalante2.1 / README < prev   
Text File  |  1993-07-14  |  20KB  |  476 lines

  1. The Esclanate system is an environment for specifying and generating
  2. visual language environments for graph model based visual languages 
  3. (e.g. nodes and edges).  There are three  major components to the system,
  4. base language module, generic editor, specification system.
  5.  
  6. The language module  is a type hierarchy that provides the base classes
  7. for the various components of the  language. These include structural
  8. and visual language constructs (e.g. nodes and edges) and a set of
  9. structured graphics objects, Gfx.... .
  10.  
  11. The generic editor provides a wide range of language editing functions.
  12. One can easily have multiple views, subgraphs, etc. 
  13.  
  14. The specification system, GrandView, supports  the specification and generation
  15. of the constructs of a target visual language. You define
  16. the constructs of the target language as well as the attributes, image,
  17. behavior, etc of those constructs. The spec system dumps out
  18. the code that realizes the target language.
  19.  
  20.  
  21. Escalante is built using the ET++ toolkit. This toolkit is available
  22. via anonymous ftp from iamsun.unibe.ch in C++/ET++/et3.0-alpha.1.tar.Z.
  23. The alpha version has some bugs and I am waiting for the release of 
  24. the beta version (which is supposed to happen any time).
  25.  
  26.  
  27. I'd like to keep track of who is using Escalante so if you
  28. could email at jeffm@cs.colorado.edu I'd appreciate it.
  29.  
  30.  
  31.  
  32. ###########################################################################
  33.  
  34. About the system name:
  35. After working forever without a nifty acronymic name I finally hit upon
  36. both some nifty acronyms as well as tying the names  into  an area that
  37. is near and dear to me, SE Utah, the canyon country. Escalante was a 18th
  38. century Spanish priest/explorer who wandered through SE Utah ~1776. 
  39. The Escalante river is named after him and was the last river to be mapped
  40. in the lower 48 states. An amazing area!! 
  41.  
  42.  
  43. ###########################################################################
  44.  
  45. Bugs:
  46. There are NO bugs :-)  Actually  there are probably alot of bugs but
  47. the system has been in use for a while by me and some others and things
  48. are gradually getting cleaned up. There are probably memory leaks all 
  49. over the place, some intentional some not. Also the fonts  are limited
  50. in the ET++ toolkit so font specs  like underlining, outlining, etc don't
  51. work.   
  52.  
  53.  
  54. IO:
  55. One feature  that  is not  a bug is the speed in which graphs are loaded
  56. and saved. Sometimes it takes more than a few seconds. The way the toolkit
  57. does object IO and how many objects there  can be makes for at times 
  58. slow going. So... have patience.
  59.  
  60.  
  61. Menus:
  62. A couple of things about the menus that appear as part of a graph element. 
  63. First (and this is a toolkit bug) if where you end up on the  menu is over a 
  64. different window then where the menu appears the menu entry won't   get set.
  65. So just hide the other window or move the window. 
  66. It also  takes a second or two to catch the menu entry and set it. If you pulldown
  67. a menu and move the mouse right after you choose a menu entry it probably  won't 
  68. catch it. So, have a touch of patience when using menus.
  69.  
  70.  
  71. !!!!!BAD BUG!!!!!
  72. For some reason in the ET++ toolkit when you try to open a window when
  73. a  mouse button  is down EVERYTHING (and I mean everything) locks up, screen, 
  74. keyboard, mouse. If this happens you need to go and kill the process. 
  75. I am hoping this will be fixed in the next release of the toolkit but I have 
  76. hacked a fix in the local et++ source. If you grab another copy
  77. of et++ then change the line in the method  XSERVER/XWindowPort::DevShow()
  78.  
  79. From this:
  80.         XMaskEvent(XWinSystem::display, StructureNotifyMask | ExposureMask | ButtonPressMask | ButtonReleaseMask, &xe);
  81.  
  82. To this: 
  83.     if(down) 
  84.         OpenNotify(portrect);
  85.     else {
  86.         XMaskEvent(XWinSystem::display, StructureNotifyMask | ExposureMask | ButtonPressMask | ButtonReleaseMask, &xe);
  87.         MapEvent(xe, &t);
  88.     }
  89.  
  90.  
  91. This fix doesn't seem to  cause any problems.
  92.  
  93.  
  94.  
  95.  
  96. Loading a file into the system when you're already running is a little buggy. 
  97. The old views are removed and new views are created. When you do  an Open  
  98. you cannot save any pre-existing views/graphs. Only the newly opened one. 
  99. Actually, if you do a Save after doing an Open  you will get the original
  100. objects from the Open plus any other objects added from any other views.
  101. So, it is best to limit the use of Open.
  102.  
  103.  
  104. The color map gets screwed up after doing a Print. This is a toolkit problem
  105. (I think). I think if the print dialog is not  over a window then you're ok.
  106.  
  107.  
  108.  
  109. For bug reports or other worthwhile queries email:
  110. jeffm@cs.colorado.edu
  111.  
  112.  
  113.  
  114. ##############################################################################3
  115.  
  116.  
  117.  
  118.  
  119. Building and using the Escalante system. 
  120.  
  121. I think if you can get ET++ to build then there won't be any problem
  122. with Escalante. I have built ET++ and Escalante  with g++2.2.2 on a 
  123. sparc and have had no problems.
  124.  
  125. Once you've got ET++ installed and built you can now go about building 
  126. Escalante.
  127.  
  128.  
  129. You can configure the system by setting some -D flags in
  130. src/ALL/Makefile. This lets you build the system with or 
  131. without various functional aspects.
  132.  
  133.  
  134. The following should be placed in your .cshrc: 
  135.  
  136.  
  137. ------------------  Cut Here   ----------------------
  138.  
  139. ########  Escalante   and ET++ stuff ####################
  140. setenv ESCALANTE_DIR path of this directory
  141. setenv ET_DIR  Where you put the et++ directory
  142. setenv ESCALANTE_CC  ${ET_DIR}/bin/etCC
  143. set path = ($ESCALANTE_DIR/bin $path )
  144.  
  145. #-------------------------------------------------
  146.  
  147. You will also want to add the ET++ font directory to your font path so 
  148. put this in your .xinitrc:
  149.  
  150. xset +fp $ET_DIR/xfonts
  151. xset fp rehash
  152.  
  153.  
  154. Copy the file ESCALANTE_DIR/ETRC to your home directory. The ET++ toolkit looks there.
  155. The important things to change here is the entry that defines
  156. where to look for bitmaps. The default path is  ESCALANTE_DIR/images
  157. but you can add an extra path in the ETRC: 
  158.  
  159. *.Escalante.ImagePath:        /Some/Path
  160.  
  161.  
  162. Now just run build in the ESCALANTE_DIR  directory. This makes clean and  include, 
  163. builds the library and then builds the applications  in the apps directory 
  164. (including the GrandView environment). 
  165.  
  166.  
  167. Ths Escalante directory is composed of the following directories:
  168.  
  169. src: Contains a set of directories (util, gm, sgm,  vgm , editor, gfx, ALL)
  170. that provide the base system.  
  171.  
  172. incl: Contains symbolic links to the include files in src/*
  173.  
  174. lib: Contains the main system library liball.o
  175.  
  176. images: Bitmaps used by the system.
  177.  
  178. bin: Contains executables, (e.g. GrandView),  and some scripts and prototype
  179. files used by GrandView.
  180.  
  181. doc: Some documentation. misc.doc has some general information. escalante.ps
  182. is a ps file of a yet to be published paper describing the general concepts
  183. underlying Escalante (though nothing about the GrandView). 
  184.  
  185.  
  186. apps/GrandView: 
  187.     This is the specification editor. When running this it's best to start in 
  188.     an empty directory somewhere because the spec editor dumps out a 
  189.     bunch of code. There is an entry in the ETRC file called 
  190.     *.GrandView.TargetName:    MyTest
  191.     Set this to what you want your generated system to be called.
  192.     The help menu has descriptions of the various views and commands
  193.     in the editor.  
  194.     
  195. In the tar tape EscalanteDemos.tar.Z there is a directory containing a bunch of
  196. demo programs I have built.
  197.  
  198.     Dataflow: This lets you string nodes together and calculate
  199.     values. The ComplexValue node has a pull down menu entry to define
  200.     an operator (e.g. +, *, /, etc.) 
  201.  
  202.     GfxExample: This has some examples that show different graphical
  203.     representations. Add elements to the clock and their value is changed.
  204.     The globes show a animated set of bitmaps.
  205.  
  206.  
  207.     Miro:    A multiple view example of the Miro instance language,
  208.     a visual language taken from the literature. This example shows 
  209.     multiple visual representations of the same 
  210.     underlying structural graph. When adding  an element in one window
  211.     a corresponding element of some other type is added in the other 
  212.     window. The edge type in one window causes containment. The other 
  213.     edge type causes a simple hierarchical layout. Typing in the text
  214.     field of one node causes that value to be propagated to the 
  215.     corresponding node.
  216.  
  217.  
  218.     Verdi:    Another example taken from the literature. Under the View/Views
  219.     menu do a new view/new element. Pick on a Role object. Up pops another
  220.     view with the subgraph of the Role. 
  221.  
  222.  
  223.     Mobile: This is a prototype of extensions to a workflow system.
  224.     This system   also exhibits multiple representations. One can
  225.     add and/or/task nodes. A role node sweeps out an area and a relation
  226.     is added between the role and any and/or/task nodes within the area. 
  227.     This relation defines  containment. One can add tokens to an and/or/task 
  228.     node using the Mobile/IncDec token menu entry. LMB inc, MMB dec. Notice
  229.     the different representation of the number of tokens in each view. 
  230.     One can simulate the graph by hitting the run or the step button.
  231.     An actor node must be attached to the  role node of an and/or/task
  232.     node for the and/or/task node to fire.
  233.  
  234.  
  235.  
  236.     Circuit: This is a simple circuit diagram editor. You can assemble 
  237.     a circuit together and change input    values thru the On/Off node. 
  238.     A lighbulb can be used to display the output of a gate. There are no 
  239.     rules for max or min number of inputs for a gate.
  240.  
  241.  
  242.  
  243. The following demos are very dynamic active environments (toys).
  244.  
  245.     Guns: This application lets you fire "Bullets" from a "Gun".
  246.     A gun is added through the Guns menu. A gun can be aimed and fired.
  247.     You can set a velocity and an increment that is added to the  velocity 
  248.     after every firing. The top sliders allow you to set a gravity in the X and Y
  249.     direction.  You can also fire a Bomb.  Bombs shoot out bullets in a circular 
  250.     pattern;
  251.  
  252.  
  253. The Waterworks, Blocks and Party  demos were inspired by Alex Repenning's AgentSheets work.  
  254. The Turing application  is inspired by both Agentsheets and Bell's ChemTrains work.
  255. The dynamic behavior of these applications   is turned on/off through 
  256. the "application name" menu entry.
  257.  
  258.     Waterworks: This application lets you assemble pipes, faucets, water drops,
  259.     water vapor etc. into a dynamic waterworks system.  You can turn on/off 
  260.     the clock through the Waterworks menu.  When a pipe fills up it turns red.
  261.     You can adjust the capacity and amount of water. A water drop falls down until
  262.     it hits some object. If the object cannot  take  water from the top then the 
  263.     droplet turns into vapor. Vapor rises until it hits something and then condenses
  264.     to droplet form. An umbrella catches water droplets and vapor and sheds the drops
  265.     to the right and left (if it can). A rock  does not take water from anywhere and 
  266.     just splashes it. A faucet is a source of water. You can increment/decrement the 
  267.     rate at which the faucet drips and the amount   of water that is dripped.
  268.     A kettle is just like a faucet except it is a source of water vapor.
  269.  
  270.     Blocks: This application  is made up of bricks, blocks, balls and killers.
  271.     Turn the clock on in the Blocks menu.    Bricks just sit where they are.  Blocks
  272.     fall until they hit something. Balls  fall until they hit something. If there is
  273.     space to the right or left a ball will roll. A killer  falls. Anything in its
  274.     path  is killed and a splat is left behind. 
  275.  
  276.  
  277.     Party:    There are two incarnations of this application which  can be controlled
  278.     by an entry in the ETRC. Both applications involve setting up a room full of people.
  279.     The first application consists of Happy people, Grumpy people, Wall Flowers and 
  280.     Wanderers. Hap[py people are attracted to all others and move accordingly. Grumpy 
  281.     people are repulsed by all others and try to move  away. Wanderers randomly wander 
  282.     about the room. Wall Flowers cling to the nearest wall. 
  283.     The second incarnation of the Party application  consists of people of different
  284.     "races". Here the races are the Disneys, the Flintstones and the Garfields. One 
  285.     can set the mutual attratcion/repulsion between the races in the ETRC.
  286.  
  287.  
  288.     Turing: This is an application  that lets you create a Turing machine. 
  289.     You can add a series of tape elements and a head over the tape elements.
  290.     You can add loose rules through the palette or tabular rules through the
  291.     Turing menu. A rule consists of a Head value, Tape value, new head value, new tape
  292.     value and a direction. The values in the Head, Tape and Rules are textual strings
  293.     and can be set  directly through the text fields.  A head tries to match its value
  294.     and the value of the tape element  it is over with one of the rules. This matching
  295.     is by regular expressions. When a matching rule is found the values for the tape
  296.     and head are set to those defined in the rule. If the new value is "-" then no change
  297.     occurs. If the new tape value is "\h" then the previous  head value is used. If the
  298.     new head value is "\t" then the tape value is used. Else whatever is there is used.
  299.     The list of rules can be moved  around. You can have any number of heads on any 
  300.     number     of tapes.
  301.  
  302.  
  303.  
  304. Running things:
  305. The systems built with Escalante are  modeful. i.e. You are in some 
  306. mode all of the time. The system does not revert to a default mode 
  307. after doing something (ala MacDraw). Also it is verb/noun oriented. 
  308. You first pick some function, e.g. delete, and then go off and delete 
  309. the objects. You can group a set of  objects and operate on them using Delete Group,
  310. Move Group, etc. 
  311.  
  312. Buttons:
  313. Generally speaking, objects are picked with the
  314. left mouse button. When adding a relation (e.g. edge), LMB to pick tail,
  315. any number of MMB for joints, LMB for picking head.
  316. By default, unless the mode you are in uses the middle mouse button,
  317. the middle mouse button moves objects. With the Control key depressed
  318. the MMB reshapes objects.   
  319.  
  320. Some commands have you draw a rectangle on the screen (e.g. picking a group).
  321. To do this you LMB Down/ Move/ LMB Up. You can clear the rectangle using the
  322. Edit/Pick/Clear Rectangle menu entry.
  323.  
  324.  
  325.  
  326. The following are descriptions of commands in the Edit menu:
  327.  
  328. Copy Element: Pick an element. Successive LMB adds a copy of that element 
  329. to the graph.
  330.  
  331. Copy Element to Palette: Pick an element and place it into the palette.
  332.  
  333.  
  334. Edit/Pick: Commands to pick single elements of particular types and
  335. pick groups of elements of particular types. Also draw and clear the 
  336. rectangle.
  337.  
  338.  
  339. The commands in the   Edit/Move menu, Move, Reshape and Move Point, alter
  340. the position and/or shape of an element. LMB performas the regular command.
  341. MMB constrains the move to either the X or the Y direction. The  Meta  key
  342. pressed causes the command to act on all visual elements  associated with the 
  343. picked element (i.e. those having a common SGraphElement). Reshape moves the 
  344. nearest point (N, NE, E, SE, S, SW, W, NW, CTR). Move Point moves the nearest     
  345. point P1 or  P2. The Control key pressed cause the Reshape and Move Point commands
  346. to act on both the picked point and on the opposite of the picked point.
  347.  
  348. The Quick Move  command lets you pick an element and then pick a point to
  349. move the element to. There is no feedback.
  350.  
  351. Move group lets you move the current picked group to a point.
  352.  
  353. Push Out lets you define a rectangular area on the screen. All elements
  354. pushed out from that area. Pull In does the opposite.
  355.  
  356. To Front/To Back lets you move an element to the front(back) to hide
  357. or see elements that obscure one another.
  358.  
  359. Edit/Joints: You can maniupl;ate individual joints with the commands here.
  360. Typically you need to first pick the element whose joints are to be maniuplated.
  361. Then perform the command any number of times on  that element.  
  362.  
  363.  
  364.  
  365.  
  366. Edit/Gfx: The entries  in this menu lets you manipulate the individual Gfx objects
  367. (e.g. Rectangle, Bitmap, etc.) that make up the image of an element.
  368.  
  369. Edit/Align: These commands lets you align and layout the elements in the currently 
  370. picked group. The ____At commands lets you pick a point. The others commands just do
  371. their stuff when you pick them from the menu.
  372.  
  373.  
  374. Edit/Scale: Scale up or down. Shrink to a minimum.
  375.  
  376. Turn Off Visibility: Turn an element off. Caution: There might not be
  377. a way to turn back on.
  378.  
  379.  
  380. Edit/Relation:  This menu contains a bunch of commands concerning relations.
  381. You can remove and set the Tail or Head element. YOu can also turn On/Off 
  382. the event dependencies.
  383.  
  384.  
  385.  
  386. The View Menu has commands for dealing with the view. 
  387.  
  388. View/Views has commands for making new views and going to new graphs
  389. with the current view. 
  390. The View/Flags lets you set various flags that govern event propagation,
  391. sending input to widget Gfx, rubber banding while adding relations, 
  392. sending move commands  to all velements of a common selement and checking
  393. if a tail(head) is ok for a relation. 
  394.  
  395. You can also turn on a grid to warp points to.  
  396.  
  397. The Multiples On entry controls whether you add multiple elements
  398. while the mouse is down. It is best to have the grid on when multiples
  399. are on.
  400.  
  401.  
  402.  
  403.  
  404.  
  405. Undo/Redo:
  406. Escalante supports undo/redo of moves, reshapes, adding and deleting. 
  407. This is done twith the right mouse button.
  408. It should support n level undo/redo but something crashes (I think in ET++).
  409. So it's  best to stay with 1 level. (The level can be set in ETRC).
  410.  
  411.  
  412.  
  413.  
  414. Widgets:
  415. The image of elements of a visual language can contain widgets (e.g. buttons,
  416. menus, text views, etc.). In general, the cursor changes to a thin cross
  417. when over such a widget. To type into a field you click on  the field (LMB) 
  418. to set the focus. Leave the mouse there and type. When the mouse is moved 
  419. the field  is no longer the focus. The Undo/Redo  Typing command and  
  420. Cut/Copy/Paste  do not work.
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427. ETRC:
  428. Within the ETRC file  you can set various flags to configure the system at runtime.
  429. There are ET++ things as well as Escalante things. This is described in the ETRC.
  430.  
  431.  
  432.  
  433.  
  434. GrandView:
  435. Once you have things built you can use the GrandView editor to specify 
  436. specific languages and generate systems  for those languages. The 
  437. best thing to do is  go to an  empty directory. Run GrandView 
  438. from this directory. Two windows are created. The specification and the 
  439. prototype views. The Help menu entry provides online help that describes the 
  440. view you are in and various commands available. That is probably a good place     
  441. to start. I have tried to make GrandView   easy to use and amenable to exploring 
  442. your language specification.  
  443.  
  444. I have never been good at naming things (with Escalante the exception). You can consider
  445. Entities as nodes and Relations as edges. The ClassView  in GrandView allows you to define
  446. a  hierarchy of entity and relation classes. (You can ignore the Structural Entity
  447. and Structural Relation, those are used when there are multiple visual graphs e.g. 
  448. Miro, Mobile). 
  449.  
  450.  
  451. You can prototype the classes  you have specified using the GrandView/Add Prototype 
  452. menu entry. GrandView creates objects in the Prototype view that have as 
  453. much functionality  as possible (without compiling).
  454.  
  455. GrandView generates code from your specification   and using 
  456. the GrandView/Make Everything menu command writes out the .C and .h files, 
  457. runs the scripts in the bin directory and produces out a working editor. 
  458. There are two general types of files the spec editor spits out. 
  459. First is the set of .C and .h files which are the language class definitions
  460. you define in the editor. The      GrandView.TargetName.[Ch] files    (e.g. MyTest.[Ch])
  461. is the editor. These are generated from generic files using the gen.sed script.
  462. These files are heavily commented. Look for the IMPORTANT commented methods. These
  463. methods are the major methods used in the editor. 
  464. Included in MyTest.[Ch] are generated files called *HS* which set up hide/show 
  465. functionality based on object type. Also there  is a set of  files *Action* which
  466. are generated in the Action View of the spec editor. These files set up menu 
  467. commands in MyTestView (in MyTest.C).
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.